@input-prefix:~ "w-fileinput";

.@{input-prefix} {
  input {
    &::-webkit-file-upload-button {
      background: transparent;
      border: 0;
      color: #0000;
      position: absolute;
      left: -300px;
    }
    &:hover:after {
      background-clip: padding-box;
      background-color: #ebf1f5;
      box-shadow: inset 0 0 0 1px rgb(16 22 26 / 20%), inset 0 -1px 0 rgb(16 22 26 / 10%);
    }
    &:after {
      box-shadow: inset 0 0 0 1px rgb(16 22 26 / 8%);
      background-color: #f5f8fa;
      background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0.8), hsla(0, 0%, 100%, 0));
      color: #182026;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      word-wrap: normal;
      border-radius: 3px;
      content: 'Browse';
      content: attr(data-label);
      padding: 0 10px;
      margin: 3px;
      text-align: center;
      right: 0;
      display: flex;
      align-items: center;
    }
    &::before,
    &::after {
      color: #757575;
      position: absolute;
      top: 0;
      bottom: 0;
    }
  }
  &-card {
    margin-right: -8px;
    &-box {
      margin-right: 8px;
      margin-bottom: 8px;
      text-align: center;
      vertical-align: top;
      background-color: #fafafa;
      border: 1px dashed #d9d9d9;
      overflow: hidden;
      border-radius: 2px;
      cursor: pointer;
      transition: border-color 0.3s;
      display: inline-flex;
      position: relative;
      &-info {
        box-sizing: border-box;
        width: 100%;
        height: 100%;
        img {
          width: 100%;
          height: 100%;
        }
      }
    }
    &-actions {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.5s;
      opacity: 0;
      background: rgba(0, 0, 0, 0.6);
      border-radius: 2px;
      &-remove {
        width: 24px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
      }
    }
    &-btn {
      align-items: center;
      justify-content: center;
    }
    &-box:hover &-actions {
      opacity: 1;
    }
    &-size-large &-box {
      width: 110px;
      height: 110px;
    }
    &-size-middle &-box {
      width: 80px;
      height: 80px;
    }
    &-size-small &-box {
      width: 50px;
      height: 50px;
    }
    &-shape-round &-box {
      border-radius: 2px;
    }
    &-shape-circle &-box {
      border-radius: 50%;
    }
  }
  &-list {
    padding-bottom: 8px;
    width: 100%;
    &-actions {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.5s;
      opacity: 0;
      background: rgba(0, 0, 0, 0.6);
      border-radius: 2px;
      &-search {
        width: 24px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
      }
    }
    &-info:hover &-actions {
      opacity: 1;
    }
    &-picture {
      border: 1px solid #d9d9d9;
      display: flex;
      align-items: center;
      padding: 5px;
      margin-top: 8px;
      &-info {
        margin-right: 10px;
        position: relative;
        overflow: hidden;
        img {
          width: 48px;
          height: 48px;
          display: block;
        }
      }
      &-text {
        flex: 1;
      }
      &-icon {
        padding: 5px;
        cursor: pointer;
      }
    }
    &-size-large &-picture {
      &-info img {
        width: 70px;
        height: 70px;
      }
    }
    &-size-middle &-picture {
      &-info img {
        width: 50px;
        height: 50px;
      }
    }
    &-size-small &-picture {
      &-info img {
        width: 30px;
        height: 30px;
      }
    }
    &-shape-round &-picture {
      &-info {
        border-radius: 2px;
      }
    }
    &-shape-circle &-box {
      &-info {
        border-radius: 50px;
      }
    }
  }

  &-list-text {
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    padding: 5px;
    transition: all 0.5s;
    &:hover {
      background: #f5f5f5;
    }
    &:first-child {
      margin-top: 8px;
    }
    &-text {
      flex: 1;
    }
    &-icon {
      padding: 0 5px;
      cursor: pointer;
    }
  }
}
